package com.yljk.mydoctor.model;

import androidx.lifecycle.MutableLiveData;

import com.yilijk.base.base.BaseRepositoryImpl;
import com.yilijk.base.network.bean.Resource;
import com.yilijk.base.network.core.RetrofitManager;
import com.yljk.mydoctor.MineApiService;
import com.yljk.mydoctor.entity.NewMineBean;

/**
 * Created by SHICHENG
 * <p>
 * Time on 2021/12/07
 */
public class MineModel extends BaseRepositoryImpl {


    /**
     * 获取个人中心数据
     */
    public MutableLiveData<Resource<NewMineBean.DataBean>> getMine(){
        MutableLiveData<Resource<NewMineBean.DataBean>> liveData = new MutableLiveData<>();
        return observeGo(RetrofitManager.getRetrofitManager().getRetrofit().create(MineApiService.class).getMineBean(), liveData);
    }

    public MutableLiveData<Resource<Boolean>> getTumor(){
        MutableLiveData<Resource<Boolean>> liveData = new MutableLiveData<>();
        return observeGo(RetrofitManager.getRetrofitManager().getRetrofit().create(MineApiService.class).getTumorOpen(), liveData);
    }


}
